// import http  from '@/axios';

import {createRouter, createWebHashHistory, RouteRecordRaw} from "vue-router";
// @ts-ignore
import Home from "../components/home/home.vue"

// @ts-ignore

const routes: Array<RouteRecordRaw> = [
    {
        path: "/",
        // @ts-ignore
        component:  () => import('../components/login/login.vue'),
    },
    {
        name:'home',
        path: "/home",
        component:Home,
        children:[{
            path:'/model/manage',
            component:()=>{
                // @ts-ignore
                return import("../components/model/manage.vue")
            }
        },
            {
                path:'/flow/manage',
                component:()=>{
                    // @ts-ignore
                    return import("../components/flow/mange.vue")
                }
            },
            {
                path:'/flow/launch',
                component:()=>{
                    // @ts-ignore
                    return import("../components/flow/launch.vue")
                }
            },
            {
                path:'/system/user',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/user.vue")
                }
            },
            {
                path:'/tool/build',
                component:()=>{
                    // @ts-ignore
                    return import("../components/tool/formList.vue")
                }
            },
            {
                path:'/tool/buildFrom',
                component:()=>{
                    // @ts-ignore
                    return import("../components/tool/build.vue")
                }
            },
            {
                path:'/system/role',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/role.vue")
                }
            },{
            path:'/system/menu',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/menu.vue")
                }
            },
            {
                path:'/system/dept',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/dept.vue")
                }
            },
            {
                path:'/system/post',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/post.vue")
                }
            },
            {
                path:'/system/account',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/account.vue")
                }
            }
            ,
            {
                path:'/map',
                component:()=>{
                    // @ts-ignore
                    return import("../components/map/MapContainer.vue")
                }
            },
            {
                path:'/system/sale',
                component:()=>{
                    // @ts-ignore
                    return import("../components/system/hospatil.vue")
                }
            },
            {
                path:'/outside',
                component:()=>{
                    // @ts-ignore
                    return import("../components/function/outside.vue")
                }
            },

            {
                path:'/task/manage/mytask',
                component:()=>{
                    // @ts-ignore
                    return import("../components/task/mytask.vue")
                }
            },
            {
                path:'/task/manage/alltasks',
                component:()=>{
                    // @ts-ignore
                    return import("../components/task/alltask.vue")
                }
            },

            {
                path:'/task/manage/completeTask',
                component:()=>{
                    // @ts-ignore
                    return import("../components/task/completetask.vue")
                }
            },
            {
                path:'/staging',
                component:()=>{
                    // @ts-ignore
                    return import("../components/staging/staging.vue")
                }
            },
            {
                path:'/system/upload',
                component:()=>{
                    // @ts-ignore
                    return import("../components/upload/file.vue")
                }
            },
            {
                path:'/flow/monitor/instance',
                component:()=>{
                    // @ts-ignore
                    return import("../components/flow/instance.vue")
                }
            } ,

        ]
    }

];
const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router
